package com.liushao.controller.admin;


import com.liushao.entity.LendItem;
import com.liushao.entity.vo.InvestVO;
import com.liushao.hfb.RequestHelper;
import com.liushao.result.Result;
import com.liushao.service.LendItemService;
import com.liushao.util.JwtUtils;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标的出借记录表 前端控制器
 * </p>
 *
 * @author chen
 * @since 2025-01-03
 */
@RestController
@RequestMapping("/admin/core/lendItem")
public class AdminLendItemController {

    /*

       return request({
      url: `/admin/core/lendItem/list/` + lendId,
      method: 'get'
     */

    @Autowired
    private LendItemService lendItemService;

    @GetMapping("/list/{lendId}")
    public Result list(
            @ApiParam(value = "标的的id",required = true)
            @PathVariable Long lendId
    ){

        List<LendItem> lendItemList = lendItemService.selectLendById(lendId);

        return  Result.ok().data("list",lendItemList);
    }


}

